.class public Lcom/waiqin365/lightapp/kehu/b/cn;
.super Landroid/widget/BaseAdapter;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Ljava/util/ArrayList;

.field private c:Landroid/os/Handler;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/ArrayList;Landroid/os/Handler;)V
    .locals 0

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    iput-object p1, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->a:Landroid/content/Context;

    iput-object p2, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->b:Ljava/util/ArrayList;

    iput-object p3, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->c:Landroid/os/Handler;

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/kehu/b/cn;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->a:Landroid/content/Context;

    return-object v0
.end method

.method private a(I)V
    .locals 3

    new-instance v1, Lcom/waiqin365/lightapp/kehu/a/a/l;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/cr;

    invoke-direct {v1, v0, p1}, Lcom/waiqin365/lightapp/kehu/a/a/l;-><init>(Lcom/waiqin365/lightapp/kehu/b/cr;I)V

    new-instance v0, Lcom/waiqin365/lightapp/kehu/a/b;

    iget-object v2, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->c:Landroid/os/Handler;

    invoke-direct {v0, v2, v1}, Lcom/waiqin365/lightapp/kehu/a/b;-><init>(Landroid/os/Handler;Lcom/waiqin365/lightapp/kehu/a/c;)V

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/kehu/a/b;->start()V

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/kehu/b/cn;I)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/waiqin365/lightapp/kehu/b/cn;->a(I)V

    return-void
.end method


# virtual methods
.method public a(Ljava/util/ArrayList;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->b:Ljava/util/ArrayList;

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/kehu/b/cn;->notifyDataSetChanged()V

    return-void
.end method

.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->b:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 10

    const/4 v2, 0x0

    const/16 v9, 0x8

    const/4 v8, 0x0

    if-nez p2, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->a:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f0301a6

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    new-instance v1, Lcom/waiqin365/lightapp/kehu/b/cq;

    invoke-direct {v1, p0, v2}, Lcom/waiqin365/lightapp/kehu/b/cq;-><init>(Lcom/waiqin365/lightapp/kehu/b/cn;Lcom/waiqin365/lightapp/kehu/b/co;)V

    invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    const v0, 0x7f0c08e7

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->a:Landroid/widget/ImageView;

    const v0, 0x7f0c08e8

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->b:Landroid/widget/TextView;

    const v0, 0x7f0c08e9

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->c:Landroid/widget/TextView;

    const v0, 0x7f0c08ea

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ProgressBar;

    iput-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->d:Landroid/widget/ProgressBar;

    const v0, 0x7f0c08e6

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->e:Landroid/widget/TextView;

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/cr;

    iget-object v2, v0, Lcom/waiqin365/lightapp/kehu/b/cr;->b:Ljava/lang/String;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v3, Lcom/fiberhome/gaea/client/b/a/a;->c:Ljava/lang/String;

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/cr;

    iget v4, v0, Lcom/waiqin365/lightapp/kehu/b/cr;->c:I

    invoke-static {v2}, Lcom/fiberhome/gaea/client/d/c;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iget-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->a:Landroid/widget/ImageView;

    iget-object v5, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->a:Landroid/content/Context;

    invoke-static {v5, v0}, Lcom/fiberhome/gaea/client/d/k;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    iget-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->b:Landroid/widget/TextView;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/cr;

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/b/cr;->b:Ljava/lang/String;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    if-eqz v4, :cond_0

    if-eqz v4, :cond_2

    div-int/lit16 v0, v4, 0x400

    if-nez v0, :cond_2

    :cond_0
    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->c:Landroid/widget/TextView;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string/jumbo v5, "B"

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :goto_1
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    if-nez v4, :cond_4

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->e:Landroid/widget/TextView;

    const/4 v2, 0x4

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->c:Landroid/widget/TextView;

    invoke-virtual {v0, v8}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->d:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v9}, Landroid/widget/ProgressBar;->setVisibility(I)V

    :goto_2
    return-object p2

    :cond_1
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/cq;

    move-object v1, v0

    goto/16 :goto_0

    :cond_2
    div-int/lit16 v0, v4, 0x400

    const/16 v2, 0x400

    if-lt v0, v2, :cond_3

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->c:Landroid/widget/TextView;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    div-int/lit16 v5, v4, 0x400

    div-int/lit16 v5, v5, 0x400

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string/jumbo v5, "MB"

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1

    :cond_3
    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->c:Landroid/widget/TextView;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    div-int/lit16 v5, v4, 0x400

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string/jumbo v5, "KB"

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1

    :cond_4
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_5

    invoke-virtual {v0}, Ljava/io/File;->length()J

    move-result-wide v6

    int-to-long v4, v4

    cmp-long v2, v6, v4

    if-nez v2, :cond_5

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->e:Landroid/widget/TextView;

    invoke-virtual {v0, v8}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->e:Landroid/widget/TextView;

    iget-object v2, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->a:Landroid/content/Context;

    const v4, 0x7f0802d6

    invoke-virtual {v2, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->e:Landroid/widget/TextView;

    new-instance v2, Lcom/waiqin365/lightapp/kehu/b/co;

    invoke-direct {v2, p0, v3}, Lcom/waiqin365/lightapp/kehu/b/co;-><init>(Lcom/waiqin365/lightapp/kehu/b/cn;Ljava/lang/String;)V

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->c:Landroid/widget/TextView;

    invoke-virtual {v0, v8}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->d:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v9}, Landroid/widget/ProgressBar;->setVisibility(I)V

    goto :goto_2

    :cond_5
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_6

    invoke-virtual {v0}, Ljava/io/File;->length()J

    move-result-wide v2

    const-wide/16 v4, 0x0

    cmp-long v2, v2, v4

    if-eqz v2, :cond_7

    :cond_6
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v0

    if-nez v0, :cond_8

    :cond_7
    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->c:Landroid/widget/TextView;

    invoke-virtual {v0, v8}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->d:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v9}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->d:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v8}, Landroid/widget/ProgressBar;->setProgress(I)V

    :goto_3
    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->e:Landroid/widget/TextView;

    invoke-virtual {v0, v8}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->e:Landroid/widget/TextView;

    iget-object v2, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->a:Landroid/content/Context;

    const v3, 0x7f080283

    invoke-virtual {v2, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->e:Landroid/widget/TextView;

    new-instance v1, Lcom/waiqin365/lightapp/kehu/b/cp;

    invoke-direct {v1, p0, p1}, Lcom/waiqin365/lightapp/kehu/b/cp;-><init>(Lcom/waiqin365/lightapp/kehu/b/cn;I)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto/16 :goto_2

    :cond_8
    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->c:Landroid/widget/TextView;

    invoke-virtual {v0, v9}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->d:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v8}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/cq;->d:Landroid/widget/ProgressBar;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/cn;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/cr;

    iget v0, v0, Lcom/waiqin365/lightapp/kehu/b/cr;->e:I

    invoke-virtual {v2, v0}, Landroid/widget/ProgressBar;->setProgress(I)V

    goto :goto_3
.end method
